<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">




<h:body>

	<ui:composition template="/WEB-INF/Facelets/template.xhtml">

		<ui:define name="content">

			<div id="contentcadastro" align="center">


				<h:form>
					<p:growl id="growl" showDetail="true" />
					<p:fieldset legend="Cadastro de Clientes" toggleable="true"
						toggleSpeed="500">
						<p:ajax event="toggle" update="growl" />
						<h:panelGrid columns="2" cellpadding="10">

							<p:outputLabel value="Nome:" />
							<p:inputText value="#{ClienteMB.cliente.nome}" maxlength="45"
								size="25" />

							<p:outputLabel value="CPF/CNPJ" />
							<p:inputText value="#{ClienteMB.cliente.cpf_cnpj}" maxlength="45"
								size="25" />

							<p:outputLabel value="Endereço:" />
							<p:inputText value="#{ClienteMB.cliente.endereco}" maxlength="45"
								size="25" />

							<p:outputLabel value="Número:" />
							<p:inputText value="#{ClienteMB.cliente.nr_endereco}"
								maxlength="45" size="3" />

							<p:outputLabel value="Complemento:" />
							<p:inputText value="#{ClienteMB.cliente.complemento}"
								maxlength="45" size="25" />

							<p:outputLabel value="Cidade:" />
							<p:inputText value="#{ClienteMB.cliente.cidade}" maxlength="45"
								size="25" />

							<p:outputLabel value="UF:" />
							<p:inputText value="#{ClienteMB.cliente.uf}" maxlength="2"
								size="2" />

							<p:commandButton value="Limpar" type="reset" />
							<p:commandButton value="Cadastrar" update="display"
								oncomplete="dialog.show()" action="#{ClienteMB.Insert()}" />

						</h:panelGrid>
					</p:fieldset>



					<p:dialog widgetVar="dialog" modal="true">
						<h:panelGrid id="display" columns="2" cellpadding="5">

							<h:outputText value="Mensagems ok " />

						</h:panelGrid>
					</p:dialog>

				</h:form>


			</div>


			<div>

				



			</div>

		</ui:define>

	</ui:composition>

</h:body>
</html>